package com.uniview.util;

import net.sf.json.JSONNull;
import net.sf.json.processors.DefaultValueProcessor;
import net.sf.json.util.JSONUtils;

public class IntegerDefaultValueProcessor implements DefaultValueProcessor {

	@SuppressWarnings("rawtypes")
	public Object getDefaultValue(Class type) {
		if( JSONUtils.isNumber( type ) ){
			if( JSONUtils.isDouble( type ) ){
				return new Double( 0 );
	         }else{
	            return null;
	         }
	      }
	      return JSONNull.getInstance();
	}

	

}
